3.1.32 \(\int \frac {\cos ^2(a+b x^2)}{\sqrt {x}} \, dx\) [32]

Optimal. Leaf size=96 \[ \sqrt {x}-\frac {e^{2 i a} \sqrt {x} \text {Gamma}\left (\frac {1}{4},-2 i b x^2\right )}{8 \sqrt [4]{2} \sqrt [4]{-i b x^2}}-\frac {e^{-2 i a} \sqrt {x} \text {Gamma}\left (\frac {1}{4},2 i b x^2\right )}{8 \sqrt [4]{2} \sqrt [4]{i b x^2}} \]

[Out]

x^(1/2)-1/16*exp(2*I*a)*GAMMA(1/4,-2*I*b*x^2)*x^(1/2)*2^(3/4)/(-I*b*x^2)^(1/4)-1/16*GAMMA(1/4,2*I*b*x^2)*x^(1/
2)*2^(3/4)/exp(2*I*a)/(I*b*x^2)^(1/4)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3483, 3439, 3437, 2239} \begin {gather*} -\frac {e^{2 i a} \sqrt {x} \text {Gamma}\left (\frac {1}{4},-2 i b x^2\right )}{8 \sqrt [4]{2} \sqrt [4]{-i b x^2}}-\frac {e^{-2 i a} \sqrt {x} \text {Gamma}\left (\frac {1}{4},2 i b x^2\right )}{8 \sqrt [4]{2} \sqrt [4]{i b x^2}}+\sqrt {x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^2]^2/Sqrt[x],x]

[Out]

Sqrt[x] - (E^((2*I)*a)*Sqrt[x]*Gamma[1/4, (-2*I)*b*x^2])/(8*2^(1/4)*((-I)*b*x^2)^(1/4)) - (Sqrt[x]*Gamma[1/4,
(2*I)*b*x^2])/(8*2^(1/4)*E^((2*I)*a)*(I*b*x^2)^(1/4))

Rule 2239

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_)), x_Symbol] :> Simp[(-F^a)*(c + d*x)*(Gamma[1/n, (-b)*(c + d
*x)^n*Log[F]]/(d*n*((-b)*(c + d*x)^n*Log[F])^(1/n))), x] /; FreeQ[{F, a, b, c, d, n}, x] &&  !IntegerQ[2/n]

Rule 3437

Int[Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)], x_Symbol] :> Dist[1/2, Int[E^((-c)*I - d*I*(e + f*x)^n), x],
 x] + Dist[1/2, Int[E^(c*I + d*I*(e + f*x)^n), x], x] /; FreeQ[{c, d, e, f}, x] && IGtQ[n, 2]

Rule 3439

Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_), x_Symbol] :> Int[ExpandTrigReduce[(a +
b*Cos[c + d*(e + f*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[p, 1] && IGtQ[n, 1]

Rule 3483

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_.)*(x_))^(m_), x_Symbol] :> With[{k = Denominator[m
]}, Dist[k/e, Subst[Int[x^(k*(m + 1) - 1)*(a + b*Cos[c + d*(x^(k*n)/e^n)])^p, x], x, (e*x)^(1/k)], x]] /; Free
Q[{a, b, c, d, e}, x] && IntegerQ[p] && IGtQ[n, 0] && FractionQ[m]

Rubi steps

\begin {align*} \int \frac {\cos ^2\left (a+b x^2\right )}{\sqrt {x}} \, dx &=2 \text {Subst}\left (\int \cos ^2\left (a+b x^4\right ) \, dx,x,\sqrt {x}\right )\\ &=2 \text {Subst}\left (\int \left (\frac {1}{2}+\frac {1}{2} \cos \left (2 a+2 b x^4\right )\right ) \, dx,x,\sqrt {x}\right )\\ &=\sqrt {x}+\text {Subst}\left (\int \cos \left (2 a+2 b x^4\right ) \, dx,x,\sqrt {x}\right )\\ &=\sqrt {x}+\frac {1}{2} \text {Subst}\left (\int e^{-2 i a-2 i b x^4} \, dx,x,\sqrt {x}\right )+\frac {1}{2} \text {Subst}\left (\int e^{2 i a+2 i b x^4} \, dx,x,\sqrt {x}\right )\\ &=\sqrt {x}-\frac {e^{2 i a} \sqrt {x} \Gamma \left (\frac {1}{4},-2 i b x^2\right )}{8 \sqrt [4]{2} \sqrt [4]{-i b x^2}}-\frac {e^{-2 i a} \sqrt {x} \Gamma \left (\frac {1}{4},2 i b x^2\right )}{8 \sqrt [4]{2} \sqrt [4]{i b x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.15, size = 120, normalized size = 1.25 \begin {gather*} -\frac {\sqrt {x} \left (-16 \sqrt [4]{b^2 x^4}+2^{3/4} \sqrt [4]{-i b x^2} \text {Gamma}\left (\frac {1}{4},2 i b x^2\right ) (\cos (2 a)-i \sin (2 a))+2^{3/4} \sqrt [4]{i b x^2} \text {Gamma}\left (\frac {1}{4},-2 i b x^2\right ) (\cos (2 a)+i \sin (2 a))\right )}{16 \sqrt [4]{b^2 x^4}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^2]^2/Sqrt[x],x]

[Out]

-1/16*(Sqrt[x]*(-16*(b^2*x^4)^(1/4) + 2^(3/4)*((-I)*b*x^2)^(1/4)*Gamma[1/4, (2*I)*b*x^2]*(Cos[2*a] - I*Sin[2*a
]) + 2^(3/4)*(I*b*x^2)^(1/4)*Gamma[1/4, (-2*I)*b*x^2]*(Cos[2*a] + I*Sin[2*a])))/(b^2*x^4)^(1/4)

________________________________________________________________________________________

Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \frac {\cos ^{2}\left (b \,x^{2}+a \right )}{\sqrt {x}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x^2+a)^2/x^(1/2),x)

[Out]

int(cos(b*x^2+a)^2/x^(1/2),x)

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 159 vs. \(2 (60) = 120\).
time = 0.11, size = 159, normalized size = 1.66 \begin {gather*} -\frac {2^{\frac {3}{4}} {\left ({\left ({\left (\sqrt {\sqrt {2} + 2} {\left (\Gamma \left (\frac {1}{4}, 2 i \, b x^{2}\right ) + \Gamma \left (\frac {1}{4}, -2 i \, b x^{2}\right )\right )} - \sqrt {-\sqrt {2} + 2} {\left (i \, \Gamma \left (\frac {1}{4}, 2 i \, b x^{2}\right ) - i \, \Gamma \left (\frac {1}{4}, -2 i \, b x^{2}\right )\right )}\right )} \cos \left (2 \, a\right ) - {\left (\sqrt {-\sqrt {2} + 2} {\left (\Gamma \left (\frac {1}{4}, 2 i \, b x^{2}\right ) + \Gamma \left (\frac {1}{4}, -2 i \, b x^{2}\right )\right )} + \sqrt {\sqrt {2} + 2} {\left (i \, \Gamma \left (\frac {1}{4}, 2 i \, b x^{2}\right ) - i \, \Gamma \left (\frac {1}{4}, -2 i \, b x^{2}\right )\right )}\right )} \sin \left (2 \, a\right )\right )} \sqrt {x} - 16 \cdot 2^{\frac {1}{4}} \left (b x^{2}\right )^{\frac {1}{4}} \sqrt {x}\right )}}{32 \, \left (b x^{2}\right )^{\frac {1}{4}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x^(1/2),x, algorithm="maxima")

[Out]

-1/32*2^(3/4)*(((sqrt(sqrt(2) + 2)*(gamma(1/4, 2*I*b*x^2) + gamma(1/4, -2*I*b*x^2)) - sqrt(-sqrt(2) + 2)*(I*ga
mma(1/4, 2*I*b*x^2) - I*gamma(1/4, -2*I*b*x^2)))*cos(2*a) - (sqrt(-sqrt(2) + 2)*(gamma(1/4, 2*I*b*x^2) + gamma
(1/4, -2*I*b*x^2)) + sqrt(sqrt(2) + 2)*(I*gamma(1/4, 2*I*b*x^2) - I*gamma(1/4, -2*I*b*x^2)))*sin(2*a))*sqrt(x)
 - 16*2^(1/4)*(b*x^2)^(1/4)*sqrt(x))/(b*x^2)^(1/4)

________________________________________________________________________________________

Fricas [A]
time = 0.12, size = 50, normalized size = 0.52 \begin {gather*} \frac {i \, \left (2 i \, b\right )^{\frac {3}{4}} e^{\left (-2 i \, a\right )} \Gamma \left (\frac {1}{4}, 2 i \, b x^{2}\right ) - i \, \left (-2 i \, b\right )^{\frac {3}{4}} e^{\left (2 i \, a\right )} \Gamma \left (\frac {1}{4}, -2 i \, b x^{2}\right ) + 16 \, b \sqrt {x}}{16 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x^(1/2),x, algorithm="fricas")

[Out]

1/16*(I*(2*I*b)^(3/4)*e^(-2*I*a)*gamma(1/4, 2*I*b*x^2) - I*(-2*I*b)^(3/4)*e^(2*I*a)*gamma(1/4, -2*I*b*x^2) + 1
6*b*sqrt(x))/b

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{2}{\left (a + b x^{2} \right )}}{\sqrt {x}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x**2+a)**2/x**(1/2),x)

[Out]

Integral(cos(a + b*x**2)**2/sqrt(x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x^(1/2),x, algorithm="giac")

[Out]

integrate(cos(b*x^2 + a)^2/sqrt(x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (b\,x^2+a\right )}^2}{\sqrt {x}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x^2)^2/x^(1/2),x)

[Out]

int(cos(a + b*x^2)^2/x^(1/2), x)

________________________________________________________________________________________